(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["page-article"],{"05c6":function(t,e,a){"use strict";a("12ce")},"12ce":function(t,e,a){},"355c":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.isDesktop?a("TMLayoutSidebar",{attrs:{"show-adv":!1}},[t.showAdministrationBlock&&t.companyInfo?a("TMCompanyAdministrationBlock",{attrs:{"company-info":t.companyInfo}}):t._e(),a("TMCompanyBasicInfoBlock",{attrs:{"company-info":t.companyInfo,"is-sidebar":""}}),t.isCompanyExpired?t._e():a("TMCompanyWidgets",{attrs:{"company-alias":t.companyName}}),t.companyBlogList&&t.companyBlogList.length?a("TMArticleListBlock",{attrs:{"data-list":t.companyBlogList,layout:"sidebar",title:t.msg("TITLE_HABR_BLOG")}}):t._e()],1):t._e()},i=[],n=a("2f62"),s=a("7043"),o=a("d43f"),c=a("94e4"),l=a("a90a"),d=a("0272"),u=a("0955"),p=a("7f7b");function m(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function f(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?m(Object(a),!0).forEach((function(e){y(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):m(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function y(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var b={name:"SidebarArticleCorporative",components:{TMArticleListBlock:s["a"],TMCompanyAdministrationBlock:o["a"],TMCompanyBasicInfoBlock:c["a"],TMCompanyWidgets:l["a"],TMLayoutSidebar:d["a"]},props:{id:{type:String,required:!0},companyName:{type:String,required:!0}},computed:f(f(f(f(f({},Object(n["c"])("global",["isDesktop"])),Object(n["c"])("articlesList",["getArticleById","getArticlesList","getCompanyAlias"])),Object(n["c"])("companies",["getCompanyInfo"])),Object(n["c"])("me",["isSuperAdmin"])),{},{articleId:function(){return this.id},companyInfo:function(){return this.getCompanyInfo(this.companyName)},isCompanyExpired:function(){return this.companyInfo&&this.companyInfo.settings&&"expired"===this.companyInfo.settings.status},companyBlogList:function(){var t=Object(u["a"])(Object(p["a"])(this.companyName));return this.getArticlesList(t)},showAdministrationBlock:function(){if(!this.companyInfo)return!1;var t=this.companyInfo.companyAdminBlockSettings;return t&&t.access||this.isSuperAdmin}})},g=b,h=a("2877"),_=Object(h["a"])(g,r,i,!1,null,null,null);e["default"]=_.exports},"527b":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("TMPage",{scopedSlots:t._u([{key:"default",fn:function(){return[a("div",{staticClass:"tm-sandbox-article__body"},[a("article",{directives:[{name:"hotkey",rawName:"v-hotkey.stop",value:{u:t.goToLastVisitedArticlesList},expression:"{ 'u': goToLastVisitedArticlesList }",modifiers:{stop:!0}}],ref:"article",staticClass:"tm-sandbox-article__content tm-sandbox-article__content_inner"},[t.article&&t.article.id?[a("TMArticleSnippet",{staticClass:"tm-sandbox-article__snippet",attrs:{article:t.article,"full-article":!0,tag:"h1"}}),t.translationData?a("div",{staticClass:"tm-sandbox-article__origin"},[a("a",{staticClass:"tm-sandbox-article__origin-link",attrs:{href:t.translationData.originalUrl,target:"_blank"}},[t._v("\n              "+t._s(t.msg("ARTICLE_ORIGIN_TITLE"))+"\n              "),a("span",{staticClass:"tm-sandbox-article__origin-value"},[t._v("\n                "+t._s(t.translationData.originalAuthorName)+"\n              ")])])]):t._e(),t.article.textHtml?a("TMArticleBody",{ref:"articleBody",attrs:{article:t.article}}):a("TMPlaceholder",{attrs:{type:"articleBody"}}),a("div",{staticClass:"tm-article-body__tags"},[t.article.tags&&t.article.tags.length?a("div",{staticClass:"tm-article-body__tags-links"},[a("span",{staticClass:"tm-article-body__tags-title"},[t._v(t._s(t.msg("ARTICLE_TAGS_TITLE")))]),t._l(t.article.tags,(function(e,r){return a("span",{key:"tag_"+r,staticClass:"tm-article-body__tags-item"},[a("router-link",{staticClass:"tm-article-body__tags-item-link",attrs:{to:t.getUrlForTag(e.titleHtml)},domProps:{innerHTML:t._s(e.titleHtml)}})],1)}))],2):t._e(),t.article.hubs&&t.article.hubs.length?a("div",{staticClass:"tm-article-body__tags-links"},[a("span",{staticClass:"tm-article-body__tags-title"},[t._v(t._s(t.msg("ARTICLE_HUBS_TITLE")))]),t._l(t.article.hubs,(function(e,r){return a("span",{key:"hub_"+r,staticClass:"tm-article-body__tags-item"},[a("TMHubLink",{staticClass:"tm-article-body__tags-item-link",attrs:{hub:e}},[a("span",{domProps:{textContent:t._s(e.title)}})])],1)}))],2):t._e()]),t.isLoggedIn?a("TMSandboxArticleFooter",{attrs:{"article-id":t.article.id,"article-lang":t.article.lang,"article-status":t.article.status}}):t._e()]:[a("TMPlaceholder",{attrs:{type:"article"}}),a("TMPlaceholder",{attrs:{type:"articleBody"}})]],2)]),a("div",{staticClass:"tm-sandbox-article__additional-blocks"},[t.isUserShowAds?a("TMAdBanner",{staticClass:"tm-sandbox-article__banner",attrs:{"ad-codes":t.adsBanner.codes,"div-id":"articleBottomBanner"}}):t._e(),a("TMNotice",{attrs:{type:"neutral"}},[a("span",{domProps:{innerHTML:t._s(t.msg("SANDBOX_ADDITIONAL_WARNING"))}})])],1)]},proxy:!0},{key:"sidebar",fn:function(){return[t.isDesktop?a("TMLayoutSidebar",{attrs:{"show-ads":!0}},[a("TMBlock",{attrs:{tag:"aside",title:t.msg("TITLE_BLOCK_SANDBOX_ABOUT"),"title-tag":"h2"}},[a("div",{staticClass:"await-about-text",domProps:{innerHTML:t._s(t.msg("SANDBOX_SIDEBAR_ABOUT"))}})]),a("TMBlock",{attrs:{tag:"aside",title:t.msg("TITLE_BLOCK_SANDBOX_ABOUT_MODERATION"),"title-tag":"h2"}},[a("div",{staticClass:"moderation-text",domProps:{innerHTML:t._s(t.msg("SANDBOX_MODERATION_BLOCK_TEXT_CONTENT"))}})])],1):t._e()]},proxy:!0}])})},i=[],n=a("2f62"),s=a("116c"),o=a("161e"),c=a("c69a"),l=a("2c95"),d=a("fe04"),u=a("19d1"),p=a("8dbe"),m=a("0272"),f=a("e4d1"),y=a("ff3c"),b=a("5188"),g=a("baf7"),h=a("3e9c"),_=a("a324"),O=a("c70c");function T(t){return L(t)||I(t)||A(t)||v()}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function A(t,e){if(t){if("string"===typeof t)return j(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?j(t,e):void 0}}function I(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function L(t){if(Array.isArray(t))return j(t)}function j(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,r=new Array(e);a<e;a++)r[a]=t[a];return r}function B(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function C(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?B(Object(a),!0).forEach((function(e){M(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):B(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function M(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var S={en:"en_US",ru:"ru_RU"},P={components:{TMHubLink:p["a"],TMAdBanner:c["a"],TMArticleBody:l["a"],TMArticleSnippet:d["a"],TMBlock:u["a"],TMLayoutSidebar:m["a"],TMNotice:f["a"],TMPage:y["a"],TMPlaceholder:b["a"],TMSandboxArticleFooter:g["a"]},asyncData:function(t){var e=t.store,a=t.route;return e.dispatch("sandbox/loadArticle",{route:a})},data:function(){return{adsBanner:{codes:Object(h["b"])(h["a"].IN_PAGE_WIDE)}}},computed:C(C(C(C(C(C(C(C({},Object(n["e"])("me",["user"])),Object(n["e"])("sandbox",["lastVisitedRoute"])),Object(n["c"])("me",["isLoggedIn"])),Object(n["c"])("i18n",["langOptions"])),Object(n["c"])("sandbox",["getArticleById"])),Object(n["c"])("ssr",["error"])),Object(n["c"])("global",["isMobile","isDesktop"])),{},{articleId:function(){return this.$route.params.id},article:function(){return this.getArticleById(this.articleId)},translationData:function(){if(this.article.postLabels&&this.article.postLabels.length){var t=this.article.postLabels.find((function(t){return"translation"===t.type}));return t&&t.data}return null},isUserShowAds:function(){return!this.user||this.user&&!this.user.hideAds},adriverPixels:function(){var t=this.article.metadata;return t&&"undefined"!==typeof t.adriverPixels?t.adriverPixels:[]},analytics:function(){var t=this.article.metadata;return t&&"undefined"!==typeof t.analytics?t.analytics:{}},isFlEnglish:function(){return"en"===this.langOptions.fl}}),metaInfo:function(){var t=this.article,e=this.articleId;if(!t||!t.metadata)return{};var a=t.metadata,r=t.timePublished,i=a.metaDescription,n=a.shareImageUrl,s=a.shareImageWidth,o=a.shareImageHeight,c=a.vkShareImageUrl,l=a.schemaJsonLd,d=t.titleHtml;return t.isCorporative&&this.companyInfo&&(d+=" / ".concat(this.msg("ARTICLE_COMPANY_BLOG",{companyName:this.companyInfo.titleHtml}))),{title:d,link:[_["g"]],meta:[].concat(T(Object(_["e"])(t.titleHtml)),T(Object(_["c"])(i)),T(Object(_["d"])(n)),[Object(_["f"])(c)],T(Object(_["a"])({id:e,date:r})),[{property:"og:type",content:"article",vmid:"og:type"},{property:"og:locale",content:S[this.article.lang],vmid:"og:locale"},{property:"og:image:width",content:s,vmid:"og:image:width"},{property:"og:image:height",content:o,vmid:"og:image:height"}]).filter(Boolean),script:[{type:"application/ld+json",innerHTML:l,vmid:"ldjson-schema"}],__dangerouslyDisableSanitizers:["script"],__dangerouslyDisableSanitizersByTagID:{"ldjson-schema":["innerHTML"]}}},mounted:function(){var t=this;this.dataPromise.then((function(){if(t.article){t.logAdriverPixel();var e=t.$route.fullPath;Object(O["a"])(e)}})).catch((function(t){return s["a"].notifyException(t)}))},methods:{getUrlForTag:function(t){return{name:"SEARCH_QUERY_RESULTS",query:{target_type:"posts",order:"relevance",q:"[".concat(t,"]")}}},logAdriverPixel:function(){this.adriverPixels&&this.adriverPixels.length&&this.adriverPixels.forEach((function(t){var e=new Image;e.src=t}))},goToLastVisitedArticlesList:function(){var t=Object(o["a"])("habr_web_home"),e=this.lastVisitedRoute.name?this.lastVisitedRoute:{name:t||"ARTICLES_LIST_ALL",params:{hl:this.langOptions.hl}};this.$router.push(e)}}},k=P,w=(a("05c6"),a("2877")),x=Object(w["a"])(k,r,i,!1,null,null,null);e["default"]=x.exports}}]);
//# sourceMappingURL=page-article.e4fcd1ed.js.map